<div class="fancbox">
    <script type="text/javascript" src="__ADDONROOT__/static/jquery-1.4.2.min.js"></script>
    <script type="text/javascript">var jQuery = $.noConflict(true);</script>
    <script type="text/javascript" src="__ADDONROOT__/static/jquery.fancybox-1.3.4.pack.js?1.2"></script>
    <script type="text/javascript" src="__ADDONROOT__/static/jquery.easing-1.3.pack.js"></script>
    <script type="text/javascript" src="__ADDONROOT__/static/jquery.mousewheel-3.0.4.pack.js"></script>
    <link rel="stylesheet" href="__ADDONROOT__/static/jquery.fancybox-1.3.4.css" type="text/css" media="screen">
    <script type="text/javascript">
        jQuery(function(){
            var group = {$addons_config['group']} ? "rel = 'group'" : "";
            jQuery('.document .content img').each(function(){
                var src = jQuery(this).attr('src');
                var title = jQuery(this).attr('title');
                jQuery(this).wrap("<a class='fancybox' title='"+title+"' "+group+" href='"+src+"' ></a>");
            });
            jQuery("a.fancybox").fancybox({
                'transitionIn'           :   "{$addons_config['transitionIn']}",
                'transitionOut'          :   "{$addons_config['transitionOut']}",
                'padding'                :   "{$addons_config['padding']}",
                'hideOnContentClick'     :   "{$addons_config['hideOnContentClick']}",
                'easingIn'               :   "{$addons_config['easingIn']}"
             });
        });
    </script>
</div>
